<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>测试执行</title>


<link rel="stylesheet" href="/css/theme/font-awesome.min.css" type="text/css" />		
<link rel="stylesheet" href="/css/theme/bootstrap.min.css" type="text/css" />	
<link rel="stylesheet" href="/javascript/theme/libs/css/ui-lightness/jquery-ui-1.9.2.custom.css" type="text/css" />		
<link rel="stylesheet" href="/css/theme/App.css" type="text/css" />
<link rel="stylesheet" href="/css/theme/custom.css" type="text/css" />
<script src="/javascript/theme/libs/jquery-1.9.1.min.js"></script>
<script src="/javascript/theme/libs/jquery-ui-1.9.2.custom.min.js"></script>
<script src="/javascript/theme/libs/bootstrap.min.js"></script>
<script src="/javascript/theme/App.js"></script>
<script type="text/javascript" src="/javascript/My97DatePicker/WdatePicker.js"></script>
<script type="text/javascript" src="/javascript/report/FusionCharts.js"></script>
<script type="text/javascript" src="/javascript/iemail.js"></script>


<style type="text/css">
.table1 {
	border: 1px solid rgb(153, 187, 232);width:100%;
}
.table_head {
	background: #B0C9E7; height: 25px; text-align: left; line-height: 25px; text-indent: 20px; font-weight: bolder;
}
.table_con {
	background: rgb(223, 232, 246);
}
.table_in {
	background: rgb(208, 208, 208); border: 0px currentColor; margin-top: 5px; margin-bottom: 5px;border-collapse: separate;border-spacing: 2px;
}
.table_in th {
	background: #F0F1F3; height: 22px; border-bottom-color: rgb(208, 208, 208); border-bottom-width: 1px; border-bottom-style: solid; text-align:center;
}
.table_in .td1 {i
	background: #F0F1F3; height: 22px; text-align: center;border-bottom-color: rgb(208, 208, 208); border-bottom-width: 1px; border-bottom-style: solid; text-align:center;
}
.table_in td {
	height: 22px; text-align: right; line-height: 22px; border-bottom-color: rgb(237, 237, 237); border-bottom-width: 1px; border-bottom-style: solid;text-align:center;
}
.tdbg10 {
	background: rgb(238, 239, 241);
}
.tdbg11 {
	background: rgb(255, 255, 255);
}

</style>

<script >		 
			 function execute(){
			 	if(checkParam() == false)
					return false;
				if(checkWarnTel() == false)
					return false;
				 var serchDate=$("#sendDate").val();
				 var reg=/^(\d{4})-(\d{2})-(\d{2})$/;
				 if(!reg.test(serchDate)){
				 	alert("日期格式不正确!");
				 	return false;
				 }
				var contentSerialize = $('#setEmailContent').serialize();
				var subValue = contentSerialize;
			 	jQuery.ajax({
        			url:"/intemail/execute",
            		type:"post",
            		async:true,
            		data:subValue,
            		success:function(data){
                		if(data == "error"){
							alert("操作失败！");
						}else if(data == "success"){
							alert("操作成功！");
							document.searchUser.submit();
						}else{
							alert(data);
						}
            		}
            	});
			 	//alert('正在执行，请耐心等待，并注意查收邮件!');
            	return false;
			 }
</script>

</head>
<body>
<div id="content" style="OVERFLOW-X:yes;OVERFLOW-Y:auto">		
		
	<div id="content-container">
		
		<form class="form-horizontal" role="form" id="setEmailContent" name="setEmailContent" action="/intemail/addNewEmail " method="post" onsubmit="return subCheck();">
    		
			<input type="hidden" id="id" name="id" value="$!{sendVo.id}"/>
			<div class="portlet">
    			
    				<div class="portlet-header">
    					<h3>
    						<i class="fa fa-tasks"></i>
    						${mainVo.emailName}
    					</h3>
    			
    				</div> <!-- /.portlet-header -->
    			
    		
                		<div class="portlet-content">
                	    	<div class="form-group">
    						<label class="col-md-2">发送邮件名 ：</label>
        					<div class="col-md-2">
        						<input style="width:680px"type="text" title="发送邮件名" id="baseSendInfo" name="baseSendInfo" value="$!{mainVo.emailName}" class="form-control"/>
        					</div>	
        				</div>
        				</br>
    					<div class="form-group">
    						<label class="col-md-2">收件人(邮箱以英文分号;间隔) ：</label>
        					<div class="col-md-2">
        						<input style="width:680px"type="text" title="收件人列表" id="baseSendInfo" name="baseSendInfo" value="$!{sendVo.emailAds}" class="form-control"/>
        					</div>	
        				</div>
						
						</br>
    					<div class="form-group">							
							<label class="col-md-2">测试日期</label>
							<div class="col-md-2">
        						<input  type="text"  title="测试日期"  id="sendDate" name="serchDate" style="width:120px;height:25px" class="Wdate form-control"  value="yyyy-MM-dd" onclick="WdatePicker({skin:'ext',dateFmt:'yyyy-MM-dd',maxDate:'%y-%M-%d'})"/>
        					</div>
							<label class="col-md-2">预警短信</label>
							<div class="col-md-2">
        						<input type="text"  title="预警短信" id="baseSendInfo" name="baseSendInfo"  value="$!{sendVo.warnTel}" class="form-control"/>
        					</div>
        				</div>
        				<div align="center" class="form-group">
        					<button type="button" onclick="execute()" class="btn btn-primary btn-xs">测试执行</button>
        				</div>
			</div> <!-- /.portlet -->

		</form>
	</div> <!-- /#content-container -->
	
	
</div> <!-- #content -->
	
<script >
	initBindGridEvent();
</script>

</body>
</html>